#include "precompiled.h"
#include "optra.h"
#include <engine.h>

#include <extensions/context.h>
#include "windowsmanager.h"
#include "tasks.h"
#include "scripting/scripttask.h"

#include "desktop.h"

class OptraCorePrivate{
	public:
	OptraCorePrivate():
			desktop(new Desktop)
		{

		}
		~OptraCorePrivate()
		{
			delete desktop;
		}

		Optra::Extensions::Context* context;
		Desktop* desktop;
};

OptraCore::OptraCore(Opl::Core::EntityObject *parent, Optra::Extensions::Context* ctx) :
	Opl::Core::EntityObject(parent), O_PRIVATE_CREATE(OptraCore)
{
	O_D(OptraCore);
	d->context = ctx;
}

OptraCore::~OptraCore()
{
	O_PRIVATE_DELETE;
}

const Optra::Extensions::Context* OptraCore::context()const
{
	O_D(const OptraCore);
	return d->context;
}

const WindowsManager* OptraCore::windowsmanager()const
{
	//O_D(const OptraCore);
	return Engine::instance()->windowsManager();
}

QString OptraCore::help()const
{
	return tr("Optra help.");
}
